package com.mazaiting.mybatisplus.encrypt.encryptor;

import org.jasypt.util.text.AES256TextEncryptor;
import org.jasypt.util.text.TextEncryptor;

/**
 * AES256 加密处理器
 *
 * @author danghailiang
 */
public class AeS256Encryptor extends CachedTextEncryptor {

    @Override
    protected TextEncryptor createTextEncryptor(String key) {
        // 获取加密器
        AES256TextEncryptor encryptor = new AES256TextEncryptor();
        // 设置Key
        encryptor.setPassword(key);
        // 返回加密器
        return encryptor;
    }
}
